﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Publicuse.Entity
{
    /// <summary>
    /// 代码生成器数据模型
    /// </summary>
    public class Generator
    {
        /// <summary>
        /// 关联查询表
        /// </summary>
        public string tablenamegl { get; set; }

        /// <summary>
        /// 所属系统平台模块
        /// </summary>
        public string ptmoudule { get; set; }

        /// <summary>
        /// 前端所属路由模块
        /// </summary>
        public string module { get; set; }

        /// <summary>
        ///  数据表名称
        /// </summary>
        public string tableName { get; set; }

        /// <summary>
        /// 数据表描述
        /// </summary>
        public string tableRemark { get; set; }

        /// <summary>
        /// 数据表字段名称
        /// </summary>
        public string name { get; set; }

        /// <summary>
        ///  数据表字段是否合并列
        /// </summary>
        public bool isadditional { get; set; }

        /// <summary>
        ///  数据表是否编辑
        /// </summary>
        public bool isadd { get; set; }

        /// <summary>
        ///  数据表字段是否编辑
        /// </summary>
        public bool isedit { get; set; }

        /// <summary>
        ///  数据表字段编辑索引
        /// </summary>
        public int editindex { get; set; }


        /// <summary>
        ///  数据表字段编辑描述长度
        /// </summary>
        public int labeldw { get; set; }

        /// <summary>
        ///  数据表字段编辑输入长度
        /// </summary>
        public int inputw { get; set; }

        /// <summary>
        /// 数据表字段是否为空
        /// </summary>
        public string isnull { get; set; }

        /// <summary>
        /// 界面字段是否为空
        /// </summary>
        public bool isnullb { get; set; }

        /// <summary>
        ///  数据表字段表字段
        /// </summary>
        public string file { get; set; }

        /// <summary>
        ///  数据表字段表字段类型
        /// </summary>
        public string fileType { get; set; }

        /// <summary>
        ///  数据表字段是否查询
        /// </summary>
        public bool isquery { get; set; }

        /// <summary>
        ///  数据表字段查询索引
        /// </summary>
        public int queryindex { get; set; }

        /// <summary>
        ///  数据表字段是否显示
        /// </summary>

        public bool istitle { get; set; }

        /// <summary>
        ///  数据表字段显示索引
        /// </summary>
        public int titleindex { get; set; }

        /// <summary>
        ///  数据表字段导出索引
        /// </summary>
        public int exportindex { get; set; }

        /// <summary>
        ///  数据表字段所跨行数
        /// </summary>
        public int rowspan { get; set; }

        /// <summary>
        ///  数据表字段所跨列数
        /// </summary>
        public int colspan { get; set; }

        /// <summary>
        ///  数据表字段所属行数
        /// </summary>
        public int row { get; set; }

        /// <summary>
        /// 数据字段界面正则表达式验证
        /// </summary>
        public string format { get; set; }

        /// <summary>
        /// 数据字典正则表达式验证描述
        /// </summary>
        public string formatremark { get; set; }

        /// <summary>
        /// 数据字段格式校验
        /// </summary>
        public string fileformat { get; set; }

        /// <summary>
        /// 数据字段唯一校验
        /// </summary>
        public string isonly { get; set; } = string.Empty;

        /// <summary>
        /// 数据字段唯一校验
        /// </summary>
        public string isonlyb { get; set; } = string.Empty;

        /// <summary>
        /// 查询编辑类型： 1 =单选下拉静态值，2=单选下拉动态值，3=多选下拉静态值 4=多选下拉动态值 5=自动补全静态 6=自动补全动态 7=输入框 8=单选框 
        /// 9=复选框 10=头像上传 11=文件上传  12=下拉框值改变关联数据绑定
        /// 13=日期(年月日时分秒) 14=日期(年月日) 15=日期(月份) 16=日期(年份) 17=多文本框
        /// </summary>
        public int querytype { get; set; }

        /// <summary>
        /// 下拉查询动态值
        /// </summary>
        public string querystra { get; set; }

        /// <summary>
        /// 下拉查询静态值
        /// </summary>
        public string querystrb { get; set; }

        /// <summary>
        /// 自动补全搜索
        /// </summary>
        public string querystrc { get; set; }

        /// <summary>
        /// 单选框值
        /// </summary>
        public string querystrd { get; set; }

        /// <summary>
        /// 下拉框值改变关联数据绑定
        /// </summary>
        public string querystrdd { get; set; }

        /// <summary>
        /// 复选框值
        /// </summary>
        public string querystre { get; set; }

        /// <summary>
        /// 是否导入
        /// </summary>
        public bool isimport { get; set; }

        /// <summary>
        /// 是否界面显示字段
        /// </summary>
        public bool isidisplayfield { get; set; }

        /// <summary>
        /// 是否偏移
        /// </summary>
        public bool isoffset { get; set; }

        /// <summary>
        /// 左移多少像素px
        /// </summary>
        public int shiftleft { get; set; }

        /// <summary>
        /// 列显示宽度多少像素px
        /// </summary>
        public int width { get; set; }

        /// <summary>
        /// 多条件查询
        /// </summary>
        public bool isquerymore { get; set; }

        /// <summary>
        /// 导出模板信息
        /// </summary>
        public string exporttemplate { get; set; }

        /// <summary>
        /// 导入模板信息
        /// </summary>
        public string importtemplate { get; set; }

        /// <summary>
        /// 新增编辑界面宽度
        /// </summary>
        public int editWidth { get; set; }

        /// <summary>
        /// 是否编辑界面标题描述
        /// </summary>
        public bool iseditdsc {get;set;}

        /// <summary>
        /// 查询默认值
        /// </summary>
        public string defaultvalue { get; set; }

        /// <summary>
        /// 是否编辑初始化
        /// </summary>
        public bool iseditinit { get; set; }

        /// <summary>
        /// 编辑初始化默认值
        /// </summary>
        public string editinitvalue { get; set; }

        /// <summary>
        /// 字段显示设置
        /// </summary>
        public string fileshow { get; set; }

        /// <summary>
        /// 字段显示设置 (下拉，复选框，单选框根据对应值显示对应内容)
        /// </summary>
        public bool fileshowb { get; set; }

        /// <summary>
        /// 字段校验类型 -1=无 1=正则表达式 2=正整数区间 3=最小最大值区间
        /// </summary>
        public int checktype { get; set; }

        /// <summary>
        /// 字段校验信息
        /// </summary>
        public string checkdata { get; set; }

        /// <summary>
        /// 不等于信息（多个用逗号分隔开）
        /// </summary>
        public string notequal { get; set; }

        /// <summary>
        /// 每页显示条数
        /// </summary>
        public int pagesize { get; set; } = 10;

        /// <summary>
        /// 导出开始行
        /// </summary>
        public int exportstart { get; set; } = 2;

        /// <summary>
        /// 是否编辑默认选项(状态和备注)
        /// </summary>
        public bool iseditdefault { get; set; } = false;

        /// <summary>
        /// 是否导出默认选项(创建时间,更新时间,描述,状态)
        /// </summary>
        public bool isexportdefault { get; set; } = false;

        /// <summary>
        /// 是否详情展开
        /// </summary>
        public bool isdetail { get; set; } = false;

        /// <summary>
        /// 默认显示字符过长截取字符长度
        /// </summary>
        public int characterlen { get; set; }

        /// <summary>
        /// 序号和操作所跨行(合并模式有效)
        /// </summary>
        public int startrow { get; set; } = 1;

        /// <summary>
        /// 所属父级ID
        /// </summary>
        public int aParentId { get; set; }

        /// <summary>
        /// 菜单名称
        /// </summary>
        public string rname { get; set; }

        /// <summary>
        /// 菜单索引
        /// </summary>
        public int rindex { get; set; }

        /// <summary>
        /// 菜单资源
        /// </summary>
        public string checkOptionsOne { get; set; }

        /// <summary>
        /// 菜单图标
        /// </summary>
        public string ahtmlIcon { get; set; }

        /// <summary>
        /// 是否启用审核
        /// </summary>
        public bool isApprove { get; set; }

        /// <summary>
        /// 自定义字段显示名称
        /// </summary>
        public string customname { get; set; }

        /// <summary>
        /// 是否只读
        /// </summary>
        public bool isreadonly { get; set; } = false;

        /// <summary>
        /// 下拉值改变赋值属性
        /// </summary>
        public string changesetvalue { get; set; }

        /// <summary>
        /// 下拉框值改变关联数据绑定
        /// </summary>
        public string changesetvalueb { get; set; }

        /// <summary>
        /// 导入结束判断内容
        /// </summary>
        public string importendstr { get; set; }

        /// <summary>
        /// 自动补全过滤条件
        /// </summary>
        public string autovalue { get; set; }

        /// <summary>
        /// 不相同的两个字段校验
        /// </summary>
        public string nosame { get; set; }

        /// <summary>
        /// 路由导航面包屑标题
        /// </summary>
        public string breadcrumbname { get; set; }

        /// <summary>
        /// 操作资源集合 1=提交 2=退回待提交 3=退回待处理 4=已阅 5=退回 6=审核通过 7=审核不通过 8=确认
        /// </summary>
        public string oresources { get; set; }

        /// <summary>
        /// 导出是否设置下拉选择对应信息
        /// </summary>
        public bool exportselect = true;
    }

    /// <summary>
    /// 查询字段模型
    /// </summary>
    public class GeneratorstaticQuery
    {
        public string name { get; set; }

        public string value { get; set; }
    }

    /// <summary>
    /// 参数下拉值校验
    /// </summary>
    public class GeneratorstaticCheck
    {
        public string label { get; set; }

        public string value { get; set; }
        public string title { get; set; }
        public string pid { get; set; }

        public string Id { get; set; }

    }

    /// <summary>
    /// 单选框模型
    /// </summary>
    public class Singlechoice
    {
        public string title { get; set; }
    
        public string value { get; set; }
    }

    public class GeneratorTemplate
    {
        /// <summary>
        /// 实体模板路径
        /// </summary>
        public string fileNameEntity { get; set; }

        /// <summary>
        /// 导出模板路径
        /// </summary>
        public string fileNameExport { get; set; }

        /// <summary>
        /// 应用模板路径
        /// </summary>
        public string fileNameApplication { get; set; }

        /// <summary>
        /// 控制器模板路径
        /// </summary>
        public string fileNameController { get; set; }

        /// <summary>
        /// 前端实体模板路径
        /// </summary>
        public string fileNameModel { get; set; }

        /// <summary>
        /// 前端列表组件模板路径
        /// </summary>
        public string fileNameIndex { get; set; }

        /// <summary>
        /// 前端编辑组件列表模板路径
        /// </summary>
        public string fileNameIndexAdd { get; set; }

        /// <summary>
        /// 前端样式模板路径
        /// </summary>
        public string fileNameScss { get; set; }

        /// <summary>
        /// 前端列表组件页面模板路径
        /// </summary>
        public string fileNameHtml { get; set; }

        /// <summary>
        /// 前端编辑组件页面模板路径
        /// </summary>
        public string fileNameHtmlAdd { get; set; }

        /// <summary>
        /// 前端模块模板路径
        /// </summary>
        public string fileNameModule { get; set; }

        /// <summary>
        /// 前端模块路由路径
        /// </summary>
        public string fileNameRoute { get; set; }

        /// <summary>
        /// 前端共享模块模板路径
        /// </summary>
        public string fileNameShareModule { get; set; }

        /// <summary>
        /// 生成导出文件路径
        /// </summary>
        public string exportPath { get; set; }
    }
    /// <summary>
    /// 查询集合模型
    /// </summary>
    public class querymodel
    {
        /// <summary>
        /// 字段名称
        /// </summary>
        public string name { get; set; }

        /// <summary>
        /// 显示名称
        /// </summary>
        public string label { get; set; }

        /// <summary>
        /// 查询类型
        /// </summary>
        public string type { get; set; }

        /// <summary>
        /// 是否显示
        /// </summary>
        public bool isShow { get; set; } = true;

        /// <summary>
        /// 开始时间字段名称
        /// </summary>
        public string timea { get; set; }

        /// <summary>
        /// 结束时间字段名称
        /// </summary>
        public string timeb { get; set; }

        /// <summary>
        /// 开始时间显示名称
        /// </summary>
        public string labela { get; set; }

        /// <summary>
        /// 结束时间显示名称
        /// </summary>
        public string labelb { get; set; }

        /// <summary>
        /// 宽度
        /// </summary>
        public string width { get; set; }

        /// <summary>
        ///  开始时间显示宽度
        /// </summary>
        public string widtha { get; set; }

        /// <summary>
        ///  结束时间显示宽度
        /// </summary>
        public string widthb { get; set; }

        /// <summary>
        /// 开始时间显示时间格式
        /// </summary>
        public string Formata { get; set; }

        /// <summary>
        /// 结束时间显示时间格式
        /// </summary>
        public string Formatb { get; set; }

        /// <summary>
        /// 开始时间是否显示时分秒选择
        /// </summary>
        public bool ShowTimea { get; set; } = true;


        /// <summary>
        /// 结束时间是否显示时分秒选择
        /// </summary>
        public bool ShowTimeb { get; set; } = true;

        /// <summary>
        /// 开始时间是否可以清空
        /// </summary>
        public bool AllowCleara { get; set; } = true;

        /// <summary>
        /// 结束时间是否可以清空
        /// </summary>
        public bool AllowClearb { get; set; } = true;

        /// <summary>
        /// 下拉选择数据集
        /// </summary>
        public string selectlist { get; set; }

        /// <summary>
        /// 下拉多选字段
        /// </summary>
        public string ngmodel { get; set; }

        /// <summary>
        /// 时间范围序号
        /// </summary>
        public int index { get; set; } = 1;
    }

}
